package com.zlx.service;

import com.zlx.entities.Student;
import com.zlx.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 周罗校
 * @Description
 * @ClassName StudentServcue
 * @date 2020.10.15 11:25:42
 * 该版权归周罗校所有，最终解释权以官方为准
 */
@Service
public class StudentServcue {
    @Autowired
    private StudentMapper studentMapper;

    public Student getStudentById(Integer id){
        return studentMapper.findStudentById(id);
    }

    public Student findStudentByNameAndPs(Student student){
       return studentMapper.findStudentByNameAndPs(student);
    }

    public List<Student> listStudent(){
        return studentMapper.listStudent();
    }

    public void addStudent(Student student){
       studentMapper.addStudent(student);
    }
}
